package com.electric.electric.controller;

import com.electric.electric.POJO.VO.DeviceModelVO;
import com.electric.electric.service.DeviceModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/device-models")
public class DeviceModelController {

    @Autowired
    private DeviceModelService deviceModelService;

    @GetMapping
    public List<DeviceModelVO> getAllDeviceModels() {
        return deviceModelService.getAllDeviceModels();
    }
}